package cn.itcast.demo.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

//这个类叫属性类，在springboot中，所有的属性资源统一都由属性类来加载
//如果某个类需要属性类对应的属性资源值，需要引入属性类
@ConfigurationProperties(prefix = "jdbc")//从指定文件中读取前缀为jdbc的资源（PS，springboot中有个默认的配置文件叫application.properties）
public class JdbcProperties {

    private String driverClassName;
    private String url;
    private String username;
    private String password;

    public String getDriverClassName() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName = driverClassName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
